<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>liningshop</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>frontPage/css/public.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath%>frontPage/css/index.css" />
		<script src="<%=basePath%>frontPage/js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=basePath%>frontPage/js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=basePath%>frontPage/js/nav.js" type="text/javascript" charset="utf-8"></script>
		<script src="<%=basePath%>frontPage/js/jquery.flexslider-min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function() {
				//加载轮播图片
				
				$('#home_slider').flexslider({
					animation: 'slide',
					controlNav: true,
					directionNav: true,
					animationLoop: true,
					slideshow: true,
					slideshowSpeed:2000,
					useCSS: false
				});
				
				

			});
			function turnOff(){
				$.ajax({
					url:"<%=basePath%>front/outLogin",
					type:"post",
					dataType:"text",
					success:function(data){	
						alert(data);
						window.location.reload();
					},
					error:function(){
						
					}
				})
			}
		</script>
	</head>
	<body>
		<!------------------------------head------------------------------>
		<jsp:include page="header.jsp"/>
		<!-------------------------banner轮播--------------------------->
		<div class="block_home_slider">
			<div id="home_slider" class="flexslider">
				<ul class="slides">
					<c:forEach items="${bannerPro }" var="bannerPro">
						<li>
							<div class="slide">
								<a href="productDetail/${bannerPro.id}"><img src="<%=basePath%>${bannerPro.imgMain}"/></a>
							</div>
						</li>
					</c:forEach>
				</ul>
			</div>
		</div>
		
		<!------------------------------thImg------------------------------>
		<%-- <div class="thImg">
			<div class="clearfix">
				<a href="vase_proList.html"><img src="<%=basePath%>frontPage/img/i1.jpg"/></a>
				<a href="proList.html"><img src="<%=basePath%>frontPage/img/i2.jpg"/></a>
				<a href="#2"><img src="<%=basePath%>frontPage/img/i3.jpg"/></a>
			</div>
		</div> --%>
		
		<!------------------------------news------------------------------>
		<div class="news">
			<div class="wrapper">
				<h2><img src="<%=basePath%>frontPage/img/ih1.jpg"/></h2>
				<div class="top clearfix" style="margin-left: 9%;">
					<c:forEach items="${productTJ }" var="productTJ">
						<a href="productDetail/${productTJ.id }" style="border: 1px solid; gray"><img src="<%=basePath%>${productTJ.imgMain}" style="width: 300px;height: 300px"/><p></p></a> 
					</c:forEach>
				</div>
				<%-- <div class="bott clearfix">
					<a href="proDetail.jsp"><img src="<%=basePath%>frontPage/img/n4.jpg"/><p></p></a>
					<a href="proDetail.jsp"><img src="<%=basePath%>frontPage/img/n5.jpg"/><p></p></a>
					<a href="proDetail.jsp"><img src="<%=basePath%>frontPage/img/n6.jpg"/><p></p></a>
				</div> --%>
				<h2><img src="<%=basePath%>frontPage/img/ih2.jpg"/></h2>
				<div class="flower clearfix tran">
					<c:forEach items="${productAll }" var="productAll">
						<a href="productDetail/${productAll.id}" class="clearfix">
							<dl>
								<dt>
									<span class="abl"></span>
										<img src="<%=basePath%>${productAll.imgMain}"/>
									<span class="abr"></span>
								</dt>
								<dd>${productAll.name }</dd>
								<dd><span>¥ ${productAll.newPrice}</span></dd>
							</dl>
						</a>
					</c:forEach>
				</div>
		<!--返回顶部-->
		<jsp:include page="gotop.jsp"></jsp:include>
		
		<!-------------------login-------------------------->
		<!--footer-->
		<jsp:include page="footer.jsp"/>
		
	</body>
</html>
